// /zhaokao-info/page

import { post, get } from '@/common/http/request';
import request from "@/common/http/axios"



// /items/list GET
export const getItemsList = (params) => {
  return request({
    url: '/items/list',
    method: 'get',
    params: params
  })
}

// /items/create POST
export const createItem = (params) => {
  return request({
    url: '/items/create',
    method: 'post',
    data: params
  })
}

// /items/delete/{id} GET
export const deleteItem = (id) => {
  return request({
    url: `/items/delete/${id}`,
    method: 'get'
  })
}

// /carousel/list GET
export const getCarouselList = (params) => {
  return request({
    url: '/carousel/list',
    method: 'get',
    params: params
  })
}

// http://localhost:8082/carousel/create POST
export const createCarousel = (params) => {
  return request({
    url: '/carousel/create',
    method: 'post',
    data: params
  })
}

// /carousel/delete/{id} GET
export const deleteCarousel = (id) => {
  return request({
    url: `/carousel/delete/${id}`,
    method: 'get'
  })
}

// /announcements/user/list GET
export const getAnnouncementsUserList = (params) => {
  return request({
    url: '/announcements/admin/list',
    method: 'get',
    params: params
  })
}

// /announcements/create POST
export const createAnnouncement = (params) => {
  return request({
    url: '/announcements/create',
    method: 'post',
    data: params
  })
}

// /announcements/delete/{id} GET
export const deleteAnnouncement = (id) => {
  return request({
    url: `/announcements/delete/${id}`,
    method: 'get'
  })
}


// /protocol/info/{code}
export const getProtocolInfo = (code) => {
  return request({
    url: `/protocol/info/${code}`,
    method: 'get'
  })
}


// /protocol/admin/update
export const updateProtocol = (params) => {
  return request({
    url: '/protocol/admin/update/code',
    method: 'post',
    data: params
  })
}
